package cn.bonoon.kernel.descriptors.impl;

import java.lang.reflect.Field;

import cn.bonoon.kernel.descriptors.EmbeddedPropertyAccessor;
import cn.bonoon.kernel.descriptors.EntityPropertyAccessor;

public abstract class AbstractEntityPropertyAccessor extends AbstractPropertyAccessor implements EntityPropertyAccessor{
	private final EmbeddedPropertyAccessor embeddedProperty;
	private final String mappedName;
	
	public AbstractEntityPropertyAccessor(Class<?> cls, String mappedName, Field field, EmbeddedPropertyAccessor embeddedProperty) {
		super(cls, field);
		this.mappedName = mappedName;
		this.embeddedProperty = embeddedProperty;
	}
	
	@Override
	public EmbeddedPropertyAccessor getEmbeddedProperty() {
		return embeddedProperty;
	}

	@Override
	public String getMappedName() {
		return mappedName;
	}
}
